package com.why.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.why.common.utils.PageUtils;
import com.why.common.utils.Query;

import com.why.dao.IndexImgDao;
import com.why.entity.IndexImgEntity;
import com.why.service.IndexImgService;


@Service("indexImgService")
public class IndexImgServiceImpl extends ServiceImpl<IndexImgDao, IndexImgEntity> implements IndexImgService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        QueryWrapper<IndexImgEntity> wrapper = new QueryWrapper<>();

        wrapper.eq("status",1);
        wrapper.orderByDesc("seq");
        IPage<IndexImgEntity> page = this.page(
                new Query<IndexImgEntity>().getPage(params),
                wrapper

        );
        return new PageUtils(page);
    }

}